package com.lost.octopus.es.processor.service.common;

import com.sunsharing.share.boot.framework.mybatis.MybatisPlusServiceImpl;
import com.lost.octopus.es.processor.dao.mapper.mybatis.EsDataCaptureRuleMapper;
import com.lost.octopus.es.processor.entity.db.EsDataCaptureRuleEntity;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Service;

import java.util.Comparator;
import java.util.List;

/**
 * es同步#增量消费规则表 服务实现类
 */
@Service
@Log4j2
public class EsDataCaptureRuleServiceImpl extends MybatisPlusServiceImpl<EsDataCaptureRuleMapper, EsDataCaptureRuleEntity> implements EsDataCaptureRuleService {

    @Override
    public List<EsDataCaptureRuleEntity> list() {
        List<EsDataCaptureRuleEntity> list = super.list();
        list.sort(Comparator.comparing(EsDataCaptureRuleEntity::getSort));
        return list;
    }
}
